<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //module.js文件
        function foo(){
            console.log('foo');
        }
        function bar(){
            console.log('bar')
        }
        export{foo,bar};
        //my_modyle.js文件
        export{foo,bar}from './module.js';
        //等价与
        //export{foo,bar}from 'my_module';
        //export{foo,bar};

        //index.html文件
        import {foo,bar}from './my_dule.js'
        foo();
    </script>
</body>
</html>